package com.qh.org.mapper;

import com.qh.org.domain.Shop;
import com.qh.basic.mapper.BaseMapper;
import com.qh.org.dto.ShopDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qhao
 * @since 2023-02-04
 */
public interface ShopMapper extends BaseMapper<Shop> {
    /**
     *校验当前店铺是否入驻过
     * @param shop
     * @return
     */
    Shop findByNameAndAddress(Shop shop);

    /**
     * 店铺审核：修改状态
     * @param state
     * @param shopId
     */
    void updateState(@Param("state") Integer state, @Param("shopId") Long shopId);


    List<ShopDto> echarts();
}
